<html>

	<head>
		<title>新增自定义分类</title>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">

		<link href="../../css/skin/default/style.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" href="../../css/dialog.css">
		<link href="../../js/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />

		<script src="../../js/lib/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>

		<script src="../../js/lib/ligerUI/js/plugins/ligerPopupEdit.js"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
		<script src="../../js/lib/jquery.form.js" type="text/javascript"></script>
		<script src="../../js/lib/json2.js" type="text/javascript"></script>
		<script type="text/javascript" src="../../js/lhgdialog/lhgdialog.js?skin=idialog"></script>

		<script src="../../js/dialog.js"></script>
		<script src="../../js/JS/layout.js"></script>
		<script src="../../js/constants.js" type="text/javascript"></script>
		<script src="../../js/api.js" type="text/javascript"></script>

		<script type="text/javascript">
			var row = JSON.parse(unescape($api.getparastr("data")));

			$(function() {
				$("form").ligerForm();
				if(row) {
					$api.loadJsonToForm(row);
					$("#Fpicurl").attr("src", row.Fhimg);
					$("#Fsummary").html( "【" + row.Fpcode + "】<br/>"+row.Fsummary );
				}
			});

			function f_save() {
				if(!$("#Frow").val()) {
					$.ligerDialog.warn('排序号不能为空！');

					return;
				}
				 
				var ret = $("form").serializeObject(); 
				ret.Fid=row.Ftpid;
				ret.Fpid = row.Fid;
				ret.Fptid = row.Fptid; 
				return ret;

			}

			function imgshow(obj) {
				var src = $(obj).attr("src");
				if("../../css/skin/default/add_pic.png" != src) {
					src = src.replace(small, big);
					$.ndialog({
						lock: true,
						title: "图片浏览",
						content: "<img src=\"" + src + "\" />",
						padding: 0,
						min: false,
						max: false
					});
					return;
				}
			}
		</script>
	</head>

	<body>
		<form id="form1" onsubmit="return false">

			<div class="div-content">
				<div class="divhead">商品</div>
				<hr class="divline" />

				<dl id="img">
					<dt>商品信息</dt>
					<dd>
						<div class="picContainer">
							<img id="Fpicurl" src="../../css/skin/default/add_pic.png" onclick="imgshow(this);" class="imgs" />

						</div>
					</dd>
				</dl>
				<dl>
					<dt> </dt>
					<dd>

						<div id="Fsummary"></div>
					</dd>
				</dl>
				<dl>
					<dt>*排序号</dt>
					<dd>
						<input type="text" value="1" id="Frow" name="Frow" ltype="text" ligerui="{digits:true,width:80,initSelect:true}" validate="{required:true}" />

					</dd>
				</dl>
				 
			</div>

		</form>
	</body>

</html>